package com.heima.bank_system;

import java.util.ArrayList;

public class BankSystem {
    private ArrayList<BankAccount> list;

    public BankSystem(ArrayList<BankAccount> list) {
        this.list = list;
    }
    public void addAccount(BankAccount a) {
        list.add(a);
    }
    public void printAccountDetails(){
        for (int i = 0; i < list.size(); i++) {
            BankAccount b = list.get(i);
           b.withdraw();
        }

    }
}
